home *** CD-ROM | disk | FTP | other *** search
/ Clickx 75 / Clickx 75.iso / software / expressionweb / expressionwebv3 / ExpressionWeb_en.exe / Setup / WeConen.cab / xweb.ACTIONS.CHKBRWSR.HTM.en < prev    next >
Encoding:
Text File  |  2009-06-09  |  7.9 KB  |  310 lines

  1. 
  2. <html>
  3.     <head>
  4.         <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  5.         
  6.         <title>Check Browser</title>
  7.         <meta name="DHTMLScriptName" content="Check &Browser">
  8.         
  9.         <meta name="DialogResizable" content="true">
  10.         <meta name="DialogSize" content="500,200">
  11.         
  12.         <style>
  13.         button    { width: 8em;  }                
  14.         table    { border: none; border-collapse: collapse }
  15.         </style>
  16.         <script type="text/JavaScript">
  17.         var L_NOURL_ErrorMessage        = "Please enter a URL";
  18.         var L_NOOPTION_ErrorMessage        = "Please choose an option";
  19.         var L_AnyOption_ListBox            = "any"; 
  20.         var L_AndUp1_ListBox            = "1 and up"; 
  21.         var L_AndUp2_ListBox            = "2 and up"; 
  22.         var L_AndUp3_ListBox            = "3 and up"; 
  23.         var L_AndUp4_ListBox            = "4 and up"; 
  24.         var L_AndUp5_ListBox            = "5 and up"; 
  25.         var L_AndUp6_ListBox            = "6 and up"; 
  26.         </script>
  27.         <script type="text/JavaScript" src="FPLib.js"></script>
  28.         <script type="text/JavaScript" src="Strings.js"></script>
  29.         <script type="text/JavaScript" src="ChkBrwsr.js"></script>
  30.     </head>
  31.     <body onload="safeFocus(theForm.BrowserType)">
  32.         <form id="theForm" name="theForm" onsubmit="Validate(); return false;">
  33.             <table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%">
  34.                 <tr>
  35.                     <td colspan="5">
  36.                         <table width="100%">
  37.                             <tr>
  38.                                 <td nowrap>
  39.                                     <label for="BrowserType">
  40.                                     
  41.                                         If the current browser <u>t</u>ype is:  
  42.                                     </label>
  43.                                     <select size="1" name="BrowserType" accesskey="t" tabindex="1" id="BrowserType">
  44.                                         
  45.                                         <option selected>Microsoft Internet Explorer</option>
  46.                                         <option>Netscape Navigator</option>
  47.                                         <option>Opera</option>
  48.                                         <option>AOL</option>
  49.                                         <option>WebTV</option>
  50.                                         <option>AOL TV</option>
  51.                                         <option>HotJava</option>
  52.                                     </select>
  53.                                     <br>
  54.                                      
  55.                                 </td>
  56.                                 <td width="100%">
  57.                                     <table cellspacing="0" cellpadding="0" style="width: 100%">
  58.                                         <tr>
  59.                                             <td width="33%">
  60.                                                  
  61.                                             </td>
  62.                                             <td width="67%">
  63.                                                 <table width="100%">
  64.                                                     <tr>
  65.                                                         <td nowrap>
  66.                                                             <label for="BrowserVersion">
  67.                                                             
  68.                                                                 <u>V</u>ersion: 
  69.                                                             </label>
  70.                                                         </td>
  71.                                                         <td width="100%">
  72.                                                             <select size="1" name="BrowserVersion" style="width: 100%" accesskey="v" tabindex="2" id="BrowserVersion">
  73.                                                                 
  74.                                                             </select>
  75.                                                         </td>
  76.                                                     </tr>
  77.                                                 </table>
  78.                                             </td>
  79.                                         </tr>
  80.                                     </table>
  81.                                     <br>
  82.                                 </td>
  83.                             </tr>
  84.                         </table>
  85.                     </td>
  86.                 </tr>
  87.                 <tr>
  88.                     <td>    </td>
  89.                     <td>
  90.                         <input type="checkbox" name="GoToURL1" value="ON" accesskey="g" tabindex="3" id="GoToURL1">
  91.                         
  92.                     </td>
  93.                     <td nowrap>
  94.                         <label for="GoToURL1">
  95.                             
  96.                             <u>G</u>o to URL: 
  97.                         </label>
  98.                     </td>
  99.                     <td width="80%" dir="ltr">
  100.                         <input type="text" name="URL1" id="URL1" tabindex="4" disabled="true" style="width: 100%; background-color: threedface"></td>
  101.                     <td>
  102.                          <button name="BrowseURL1" value="Browse..." onclick="PickURL(URL1);" disabled="true" tabindex="5" accesskey="b">
  103.                             
  104.                             
  105.                             <u>B</u>rowse...
  106.                         </button>
  107.                     </td>
  108.                 </tr>
  109.                 <tr>
  110.                     <td colspan="5" nowrap>
  111.                         <br>
  112.                         
  113.                         Otherwise, for all other browsers:
  114.                         <br>
  115.                          
  116.                     </td>
  117.                 </tr>
  118.                 <tr>
  119.                     <td>     
  120.                     </td>
  121.                     <td>
  122.                         <input type="checkbox" name="GoToURL2" value="ON" accesskey="u" tabindex="6" id="GoToURL2">
  123.                                                 
  124.                     </td>
  125.                     <td nowrap>
  126.                         <label for="GoToURL2">
  127.                             
  128.                             Go to <u>U</u>RL: 
  129.                         </label>
  130.                     </td>
  131.                     <td width="80%" dir="ltr">
  132.                         <input type="text" name="URL2" id="URL2" tabindex="7" disabled="true" style="width: 100%; background-color: threedface"></td>
  133.                     <td>
  134.                          <button name="BrowseURL2" value="Browse..." onclick="PickURL(URL2);" disabled="true" tabindex="8" accesskey="r">
  135.                             
  136.                             
  137.                             B<u>r</u>owse...
  138.                         </button>
  139.                     </td>
  140.                 </tr>
  141.                 <tr>
  142.                     <td height="80%"></td>
  143.                 </tr>
  144.                 <tr>
  145.                     <td colspan="5">
  146.                         <hr>
  147.                         <table border="0" bordercolor="#111111" width="100%">
  148.                             <tr>
  149.                                 <td width="100%"></td>
  150.                                 <td>
  151.                                     <button name="OK" value="OK" type="submit" tabindex="9">
  152.                                         
  153.                                         OK
  154.                                     </button>
  155.                                 </td>
  156.                                 <td> </td>
  157.                                 <td>
  158.                                     <button name="Cancel" value="Cancel" onclick="CancelAction();" tabindex="10">
  159.                                         
  160.                                         Cancel
  161.                                     </button>
  162.                                 </td>
  163.                             </tr>
  164.                         </table>
  165.                     </td>
  166.                 </tr>
  167.             </table>
  168.         </form>
  169.     </body>
  170.     <script language="javascript" id="EventHandler">
  171. theForm.GoToURL1.onclick = e_GoToURLonclick;
  172. theForm.GoToURL2.onclick = e_GoToURLonclick;
  173. theForm.BrowserType.onchange = e_BrowserTypeOnChange;
  174.  
  175. //Click event for the go to URL check box
  176. function e_GoToURLonclick()
  177. {
  178.     if (event.srcElement.name == "GoToURL1")
  179.     {
  180.         theForm.URL1.disabled = !(theForm.URL1.disabled);
  181.         theForm.BrowseURL1.disabled = theForm.URL1.disabled;
  182.         if (theForm.URL1.disabled == false)
  183.  
  184.             theForm.URL1.style.backgroundColor = "window";
  185.         else
  186.             theForm.URL1.style.backgroundColor = "threedface";
  187.     }
  188.     if (event.srcElement.name == "GoToURL2")
  189.     {
  190.         theForm.URL2.disabled = !(theForm.URL2.disabled);
  191.         theForm.BrowseURL2.disabled = theForm.URL2.disabled;
  192.         if (theForm.URL2.disabled == false)
  193.             theForm.URL2.style.backgroundColor = "window";
  194.  
  195.         else
  196.             theForm.URL2.style.backgroundColor = "threedface";
  197.  
  198.     }
  199. }
  200.  
  201.  
  202. //Change Event fot the browser drop down
  203. function e_BrowserTypeOnChange()
  204. {
  205.     var sSelectedBrowser = theForm.BrowserType.children(theForm.BrowserType.selectedIndex).text;
  206.     switch (sSelectedBrowser)
  207.     {
  208.         case "Microsoft Internet Explorer":
  209.         {
  210.             AddVersionOptions(2,6);
  211.             break;
  212.         }
  213.         case "Netscape Navigator":
  214.         {
  215.             AddVersionOptions(2,6);
  216.             break;
  217.         }
  218.         case "Opera":
  219.         {
  220.             AddVersionOptions(2,5);
  221.             break;
  222.         }
  223.         case "AOL":
  224.         {
  225.             AddVersionOptions(1,0);
  226.             break;
  227.         }
  228.         case "WebTV":
  229.         {
  230.             AddVersionOptions(1,0);
  231.             break;
  232.         }
  233.         case "AOL TV":
  234.         {
  235.             AddVersionOptions(1,0);
  236.             break;
  237.         }
  238.         case "HotJava":
  239.         {
  240.             AddVersionOptions(3,3);
  241.             break;
  242.         }
  243.     }
  244. }
  245. function AddVersionOptions(nLow,nHigh)
  246. {
  247.     nLen=theForm.BrowserVersion.options.length;
  248.     for (i=0; i < nLen; i++)
  249.     {
  250.         theForm.BrowserVersion.options.remove(0);
  251.     }
  252.     oOption=document.createElement("option");
  253.     oOption.text = L_AnyOption_ListBox;
  254.     oOption.value = 'any';
  255.     oOption.Selected = true;
  256.     theForm.BrowserVersion.options.add(oOption);
  257.     for (i=nLow; i<=nHigh; i++)
  258.     {
  259.         oOption=document.createElement("option");
  260.         oOption.text = i;
  261.         oOption.value = i;
  262.         theForm.BrowserVersion.options.add(oOption);
  263.         oOption=document.createElement("option");
  264.         if (i==1)
  265.         {
  266.             oOption.text = L_AndUp1_ListBox;
  267.             oOption.value = i + "\+";
  268.         }
  269.         if (i==2)
  270.         {
  271.             oOption.text = L_AndUp2_ListBox;
  272.             oOption.value = i + "\+";
  273.         }
  274.         if (i==3)
  275.         {
  276.             oOption.text = L_AndUp3_ListBox;
  277.             oOption.value = i + "\+";
  278.         }
  279.         if (i==4)
  280.         {
  281.             oOption.text = L_AndUp4_ListBox;
  282.             oOption.value = i + "\+";
  283.         }
  284.         if (i==5)
  285.         {
  286.             oOption.text = L_AndUp5_ListBox;
  287.             oOption.value = i + "\+";
  288.         }
  289.         if (i==6)
  290.         {
  291.             oOption.text = L_AndUp6_ListBox;
  292.             oOption.value = i + "\+";
  293.         }                                
  294.         theForm.BrowserVersion.options.add(oOption);
  295.     }
  296. }
  297. //call the change event to initialize the first time
  298. e_BrowserTypeOnChange()
  299.  
  300. function PickURL(eURL)
  301. {
  302.     var url = FrontPage.ShowPickURLDialog(FrontPage.ActiveDocument.url, eURL.value);
  303.     if (url != '') 
  304.         eURL.value = url;
  305.     eURL.focus();
  306. }
  307.  
  308.     </script>
  309. </html>
  310.